* Tweaked getRevision() return type to NULL on failure
* Changed "$revision === null" checks to just "!$revision" (this avoids the landmine of getting false or something)
if ( $oldid ) {
$revision = Revision::newFromId( $oldid );
- if ( $revision === null ) {
+ if ( !$revision ) {
wfDebug( __METHOD__ . " failed to retrieve specified revision, id $oldid\n" );
return false;
}
}
$revision = $this->mPage->getRevision();
- if ( $revision === null ) {
+ if ( !$revision ) {
wfDebug( __METHOD__ . " failed to retrieve current page, rev_id " . $this->mPage->getLatest() . "\n" );
return false;
}
/**
* Get the latest revision
- * @return Revision|false
+ * @return Revision|null
*/
public function getRevision() {
$this->loadLastEdit();
if ( $this->mLastRevision ) {
return $this->mLastRevision;
}
- return false;
+ return null;
}
/**